package com.lianxi.Courses.service;

import com.github.pagehelper.PageInfo;
import com.lianxi.Courses.entity.Chapter;
import com.lianxi.Courses.entity.Course;
import com.lianxi.Courses.exception.ChapterExistException;
import com.lianxi.Courses.exception.CourseExistException;
import com.lianxi.Courses.exception.FileUploadErrorException;
import com.lianxi.Courses.exception.RequestParameterErrorException;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.List;

public interface ChapterService {
    PageInfo<Chapter> findPage(Chapter chapterParam, String pageNo, String pageSize);
    void addChapter(String title, String info, CommonsMultipartFile file, String resourceTitle,
                    String costType, String costNum, Date createDate, String fileType,
                    HttpSession session, Integer courseId) throws RequestParameterErrorException, ChapterExistException, FileUploadErrorException;
    void modifyChapter(String id, String title, String info, CommonsMultipartFile file, String resourceTitle,
                       String costType, String costNum, Date createDate, String fileType,
                       HttpSession session, Integer courseId)throws RequestParameterErrorException, ChapterExistException, FileUploadErrorException;
    void modifyStatus(String id, String status) throws RequestParameterErrorException;
     Chapter findById(String id) throws RequestParameterErrorException;
    List<Chapter> findByCourseId(Integer courseId) throws RequestParameterErrorException;
}